import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
//引入element-plus
import 'element-plus/dist/index.css'
//国际化
import zhCn from 'element-plus/es/locale/lang/zh-cn'
//svg配置文件
//@ts-ignore
import 'virtual:svg-icons-register'
//自定义插件对象
//@ts-ignore
import globalComponent from '@/components'
//引入模版的全局样式
import '@/styles/index.scss'

//引入路由
import router from './router'

//pinia
import pinia from './store'

//路由鉴权
import './permission'

const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn,
})

//使用自定义插件
app.use(globalComponent)
//使用路由
app.use(router)
//使用pinia
app.use(pinia)
app.mount('#app')
